import React, { PureComponent } from "react";
import proptypes from "prop-types";
class Son extends PureComponent {
  state = {
    sonMsg: 'hello from son'
  }
  render() {
    console.log(this.props)
    // console.error("Test error message"); // 检查是否能正常显示
    return <div>子组件：{this.state.sonMsg}
      {this.props.msg}
      <br></br>
      {this.props.children}
      <br />
      {this.props.a}
      <br />
      {this.props.scopeslot(this.state.sonMsg)}
    </div>
  }
}
Son.propTypes = {
  msg: proptypes.string,
}
export default Son